package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.ProjectTemplateBindMapper;
import com.ruoyi.project.domain.ProjectTemplateBind;
import com.ruoyi.project.service.IProjectTemplateBindService;

/**
 * 项目模板绑定Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-08-05
 */
@Service
public class ProjectTemplateBindServiceImpl implements IProjectTemplateBindService 
{
    @Autowired
    private ProjectTemplateBindMapper projectTemplateBindMapper;

    /**
     * 查询项目模板绑定
     * 
     * @param id 项目模板绑定主键
     * @return 项目模板绑定
     */
    @Override
    public ProjectTemplateBind selectProjectTemplateBindById(Long id)
    {
        return projectTemplateBindMapper.selectProjectTemplateBindById(id);
    }

    /**
     * 查询项目模板绑定列表
     * 
     * @param projectTemplateBind 项目模板绑定
     * @return 项目模板绑定
     */
    @Override
    public List<ProjectTemplateBind> selectProjectTemplateBindList(ProjectTemplateBind projectTemplateBind)
    {
        return projectTemplateBindMapper.selectProjectTemplateBindList(projectTemplateBind);
    }

    /**
     * 新增项目模板绑定
     * 
     * @param projectTemplateBind 项目模板绑定
     * @return 结果
     */
    @Override
    public int insertProjectTemplateBind(ProjectTemplateBind projectTemplateBind)
    {
        projectTemplateBind.setCreateTime(DateUtils.getNowDate());
        return projectTemplateBindMapper.insertProjectTemplateBind(projectTemplateBind);
    }

    /**
     * 修改项目模板绑定
     * 
     * @param projectTemplateBind 项目模板绑定
     * @return 结果
     */
    @Override
    public int updateProjectTemplateBind(ProjectTemplateBind projectTemplateBind)
    {
        projectTemplateBind.setUpdateTime(DateUtils.getNowDate());
        return projectTemplateBindMapper.updateProjectTemplateBind(projectTemplateBind);
    }

    /**
     * 批量删除项目模板绑定
     * 
     * @param ids 需要删除的项目模板绑定主键
     * @return 结果
     */
    @Override
    public int deleteProjectTemplateBindByIds(Long[] ids)
    {
        return projectTemplateBindMapper.deleteProjectTemplateBindByIds(ids);
    }

    /**
     * 删除项目模板绑定信息
     * 
     * @param id 项目模板绑定主键
     * @return 结果
     */
    @Override
    public int deleteProjectTemplateBindById(Long id)
    {
        return projectTemplateBindMapper.deleteProjectTemplateBindById(id);
    }
}
